<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>报名页</title>
</style>
<style type="text/css">
@import url("css/common.css");
</style>
<script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
</head>
<script language="javascript">
function loadimage(){ 
	document.getElementById("randImage").src = "image.jsp?"+Math.random(); 
} 

function PhoneCheck(s)//检测是否为固定电话号码或手机号   
{   
var str=s;   
var reg=/^(13[0-9]{9}$)|(15[0-35-9][0-9]{8}$)|([0-9]{1}[0-9]{2,3}-[1-9]{1}[0-9]{5,8}$)|(18[05-9][0-9]{8}$)/;   
return reg.test(str);   
} 

function checkForm(){
	var frm = window.document.frm1;	
	if(frm.userName.value=='')	
	{
		alert("请输入姓名！");
		frm.userName.focus();
		return ;
	}
	if(frm.email.value=='')	
	{
		alert("请输入Email地址！");
		frm.email.focus();
		return ;
	}
	if(frm.email.value.length >0)  {  
    	var email = frm.email.value;
    	var pattern = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
		flag = pattern.test(email);
		if(!flag){
        	alert("对不起，邮件格式不正确!");
        	frm.email.focus();
        	return  ;
      }
    }
	if(frm.telephone.value=='')	
	{
		alert("请输入手机号！");
		frm.telephone.focus();
		return ;
	}
	if(frm.telephone.value.length >0)  {  
      if(PhoneCheck(frm.telephone.value))  {   
      } else {  
        alert("请输入正确的手机号码!");
        frm.telephone.focus();  
        return ; 
      }  
    }
	if(window.confirm("确定您提交的信息无误，并进行报名吗？"))
	{
		frm.submit();		
	} 
}

</script>
<body>
<div class="div" id="all">
  <div class="all" id="allTopDiv">
   <!-- <iframe src="common/top.jsp" height="130px" width="100%" frameborder="0" scrolling="no"  ></iframe>-->

<%@include file="common/top.jsp"%>
  </div>
  <div class="all" id="allmain">
    <div class="allmain" id="allmainDivTop">
      <div class="all" id="allmainDivTopClose"> </div>
      <div class="allmainDivTop" id="allmainDivTopDiv"><%@include file="common/bar.jsp"%></div>
    </div>
    <div class="allmain" id="allmainLeft">
      <div id="TabbedPanels1" class="TabbedPanels">
        <ul class="TabbedPanelsTabGroup">
          <li class="TabbedPanelsTab" tabindex="0">报名信息填写</li>         
        </ul>
        
        <div class="TabbedPanelsContentGroup">	  
          <div class="TabbedPanelsContent">
		    <form name="frm1" action="addapply.do" method="post">
			<input type="hidden" name="campaignId" value="${campaignId}"/>
														
			 <table width="800" border="0" >
			 <tr>
				<td  colspan="2"><strong>课程信息：</strong>&nbsp;</td>
			  </tr>
			 <tr>
				<td width="10%">所报课程：&nbsp;</td>
				<td>${campaign.lesson.name} ${campaign1.lesson.name} &nbsp;</td>
			  </tr>
			 <tr>
				<td width="10%">课程价格：&nbsp;</td>
				<td>${campaign.lesson.cost}${campaign1.lesson.cost}元  &nbsp;</td>
			  </tr>
			  <tr>
				<td width="10%">课程优惠：&nbsp;</td>
				<td>${campaign.discountComments}${campaign1.discountComments}  &nbsp;</td>
			  </tr>
			  <tr>
				<td  colspan="2"><strong>个人信息：</strong>&nbsp;</td>
			  </tr>
			  <tr>
				<td width="10%">姓名：&nbsp;</td>
				<td><input type="text" name="userName" value="${applyRecord.userName}" />  *&nbsp;(请填写真实姓名)</td>
			  </tr>
			  <tr>
				<td>Email:&nbsp;</td>
				<td><input type="text" name="email" value="${applyRecord.email}" />  *&nbsp;(请正确填写邮箱，后续将发送团购码到此邮箱)</td>
			  </tr>
			  <tr>
				<td>手机：&nbsp;</td>
				<td><input type="text" name="telephone" value="${applyRecord.telephone}"/>  *&nbsp;(请填写有效手机号，以便及时与您联系)</td>
			  </tr>
			  <tr>
				<td>验证码:&nbsp;</td>
				<td><input type="text" name="rand" />&nbsp;
				<img alt="code..." name="randImage" id="randImage" src="image.jsp" width="60" height="20" border="1" align="absmiddle">
				<a href="javascript:loadimage();"><strong><font color="#0033FF">看不清点我</font></strong></a>
				<font color="#009900">${msg}</font>
				</td>
			  </tr>
			  <tr>
			  	<td colspan="2">注：带 * 的为必填项</td>
			  </tr>
			  <tr>
			  	<td>&nbsp;</td>
				<td><input type="button" value="提 交" onclick="checkForm();"/>&nbsp;</td>				
			  </tr>
			</table>
		  <strong>说明：</strong><br>
		  1.报名前，请详细阅读招生简章；<br>
		  2.报名过程请正确填写姓名，手机，邮箱等信息；<br>
		  3.报名信息提交后，系统将发送团购码到您的邮箱，凭团购码享受课程优惠；<br>
		  4.凭团购码在5iitt网站上查询您的报班情况；<br>
		  5.报名过程有疑问的，可通过在线QQ交谈进行咨询，或通过联系方式中电话联系。<br>
			</form>            
		  </div> 
		  
		  
		  
		  
		  
       	</div>
       
      </div>
    </div>
    <div class="allmain" id="allmainRight">
		 <%@include file="common/right.jsp"%>
    </div>
  </div>
  <div class="all" id="allfooter">
  	<%@include file="common/footer.jsp"%>
  </div>
</div>
<script type="text/javascript">
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
</script>
</body>
</html>
